import request from '@/utils/request'
import config from '@/config'

export function fetchList(data) {
  return request({
    url: config.context + '/api/index/jzType/list',
    method: 'post',
    headers: {
    	'Content-Type': 'application/json',
    },
    params: data
  })
}

export function createRow(data) {
  return request({
    url: config.context + '/api/index/jzType/save',
    method: 'post',
    data
  })
}

export function updateRow(data) {
  return request({
    url: config.context + '/api/index/jzType/edit',
    method: 'post',
    data
  })
}
export function deleteRow(data) {
  return request({
    url: config.context + '/api/index/jzType/del',
    method: 'post',
    data
  })
}


export function fetchTypeList(data) {
  return request({
    url: config.context + '/api/index/jzType/enableList',
    method: 'post',
    data
  })
}

export function fetchAllAccount() {
  return request({
    url: config.context + '/api/wx/account/listAll',
    method: 'post'
  })
}

export function generateQRUrl(data) {
  return request({
    url: config.context + '/api/wx/account/generateQRUrl',
    method: 'post',
    data
  })
}

export function listTreeWxAccount() {
  return request({
    url: config.context + '/api/wx/account/listTreeWxAccount',
    method: 'post'
  })
}
